<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>研发中心</title>
</head>
<body>

<script>
    var Car = (function () {
        var Bus = function (a, b, c) {
            this.model = a;
            this.year = b;
            this.miles = c;
        };
        return function (model, year, miles) {
            return new Bus(model, year, miles);
        };
    })();

    var tom = new Car("Tom", 2009, 20000);
    console.log(tom.model+tom.year+"年"+tom.miles);
    var dudu = new Car("Dudu", 2010, 5000);
    console.log(dudu.model+dudu.year+"年"+dudu.miles);
</script>
</body>
</html>